==========[ Introduction ]==========
Prim Puppeteer is a set of scripts that will help animate your creation. The system is very similar to stop-motion animation. It works by taking snapshots of your prim's positions and allowing you to play back the recorded snapshots.
No coding is required to to use Puppeteer. However, if you are a scripter, you can further control the animation through linked message calls. Please read the section titled “Scripter's Guide”. ==========[ Table of Contents ]==========
- Introduction & Need to Know
- Basic Setup
- Chat Commands
- Triggers & Playback Customization
-Scene Rezzer Overview
-Rezzer UI Script
-Kill Script
-Float script
To Begin there is a program you will need called Prim Puppeteer (v8.0) This will overview the basics of P.P. and show how it can be used to create "animated scenes".
-= Need to Know =-
To use Puppeteer, you should have some basic understanding of the difference between linked prims and root prim. Here are some quick facts you need to know:
- There is only one root prim per link set.
- Root prim have a yellow border around it during editing.
- Link prims have a blue border around it during editing.
- Root prim will always be the last prim you select before using the Tools->Link command.
- Puppeteer only moves link prims and all movement are relative to the root prim.
Tip: Use an invisible root prim if you wish to create the illusion of the entire object moving.
Tip: Be sure to click the “Edit linked parts” check box in order to move the linked prims.
-= The Basic Setup =-
The easiest way to setup Puppeteer is by following the steps in Quick Start Instructions: This quick start guide and much more detailed info can be found on the notecard provided with the Prim Puppeteer.
1)Add all three Puppeteer scripts into the object you wish to animate.
2)Right click the object and select 'Take' then re-rez the object back out from your inventory.
3)Right click the object and select 'Edit...' then select 'Tools -> Set Scripts to Running in Selection' from the top menu bar.
After setup is complete. The “Puppeteer Link” script will delete itself from the root prim.
4) Type: /32 menu to bring up the P.P. menu.
To record snapshots with Puppeteer, type “/32 menu” to bring up the Edit Menu. After moving the prims around, simply click the “record” button to take a snapshot.
A snapshot in Puppeteer is simply a recording of all link prim's position, rotation, and size/scale. This have nothing to do with actually taking screenshots.
-= Chat Commands =-
Puppeteer supports a lot more commands than what is shown on the Edit Menu. To see all the possible commands, click the “help” button on the menu or type “/32 help”
Full chat command list:
/32 menu
This command brings up the Editing Menu. A must know!
/32 show <snapshot number>
This command will display a specific snapshot.
Example: “/32 show 2” This will show snapshot #2
Tip: You can drag the Puppeteer Editor script back into the object to unpublish and re-edit at any time. Please also note that you will note be able to edit other people's recordings.
/32 play
This command is similar to pressing the “play button” on the Editing Menu. The difference is that through chat command, you can loop the animation as well as set the play speed.
Example: “/32 play loop” will play the animation non-stop.
Example: “/32 play 0.5” will play the animation with only a 0.5 second delay between snapshots.
Example: “/32 play loop 2.0” will play animation non-stop with a 2 second delay between snapshots.
Note: 0.1 second delay between snapshots is the fastest allowed play speed.
/32 rplay
This command is very similar to the “/32 play” command except that it plays the animation in reverse order. You can also make this command loop or change the play speed.
/32 trigger
This command is the same as pressing the “trigger” button on the Editing Menu. It will allow you to customize the playback behavior. The triggers are only active after publish. See “Triggers & Playback Customization” section for more detail.
/32 delete <snapshot number>
This command will delete the snapshot specified.
Example: “/32 delete 3” will delete snapshot number 3\
/32 replace <snapshot number>
This command will record the current prim positions over the given snapshot. It is similar to the “/32 record” command except that the snapshot is not added to the end. Instead the snapshot will replace number specified.
Example: “/32 replace 2” will take a new snapshot and replace snapshot 2.
/32 insert <snapshot number>
This command will record a new snapshot and add it right before the specified snapshot.
Example: “/32 insert 4” will record a new snapshot and add it before the existing snapshot #4. So the old snapshot #4 is now snapshot #5 and the rest of the snapshots are all shifted down.
/32 reset
This command will delete ALL recorded snapshots.
/32 status
This command shows how many snapshots have been recorded. Number of recorded snapshots is also visible on the Edit Menu.
/32 export
This command will export print out all the recorded snapshots to the chat window for copy & paste into notecards. Due to Second Life's notecard size limitation, the export may span multiple notecards.
It is important to make sure the chat window is wide enough so the lines do not warp around.
Note: Playback settings are not part of the export. Only the recorded snapshots are exported.
/32 import <notecard name>
This is a Vendor Edition only command. This command is used to import the snapshots with the “/32 export” command. See “Importing from Notecard” section above for more details.
/32 purge
This command will delete ALL puppeteer scripts from the object. This can be used in conjunction with import/export command to upgrade to future versions of Puppeteer.
/32 removeunusedscripts
This command will look at the currently recorded animation and delete all the Puppeteer Link scripts that would not affect the animation. Basically any prim that has not moved, rotated, or resized will have thier script deleted from them. This is great for general optimzation. However, should you need to animate those prims again, you will need to add the Puppeteer Link scripts manually. It may also disrupt the anchoring feature of Puppeteer.
/32 channel <new channel number>
This command allows you to change the channel that the chat commands use. Please keep in mind that all chat commands are already restricted to owner only. Therefore there's no chance for conflict with other nearby Puppeteer users. This command only exist for personal preference.
Example: “/32 channel 3” from now on all commands listen on channel 3. So to bring up the menu would be “/3 menu”.
-= List of Animation Triggers =-
[ On-Touch ]
This trigger will activate when the object is clicked. Click the object again to stop the animation. This is the default trigger.
[ On-Chat ]
This trigger will activate the animation when a specific chat phrase is heard. After selecting On-Chat, another menu will show up allowing you to customize the start and stop phrase as well as the listening channel.
If the start and stop phrase is set to the same phrase, that chat phrase will use as a on/off toggle.
[ On-Rez ]
This trigger will start the animation as soon as an object is dragged from the inventory into the world.
[ On-Collision ]
This trigger will start the animation when the object is bumpped into or stepped on. You can use this trigger to activate an animation when someone is near it by having one of the prims covering the floor so people can step on it.
Note: SL's collision detection is not always reliable, especially when laggy. It is best to use On-collision triggers with play-once style rather than loop or ping-pong.
[ On-Sit ]
This trigger will start the animation when someone sits on the object. Make sure you adjust the set position using another script to get the desire effect.
[ On-Chance ]
This trigger will fire base on the percentage and the interval you specify. It is great for ambient animations. It will not activate if other trigger animations are currently playing. There are two exceptions to this, On-rez loops, and On-chance loops.
[ On-Fly ]
This trigger will only activate when the animated object is attached to an avatar. The trigger activates when the avatar is flying. This is useful for making wings or jet packs.
[ On-Walk ]
This trigger will only activate when the animated object is attached to an avatar. The trigger activates when the avatar is walking. This is an easy way to create fake attachment based vehicles that animate when you walk.
[ On-Typing ]
This trigger will only activate when the animated object is attached to an avatar. The trigger activates when the avatar is typing in chat. It is possible to make objects that pop up when you are typing and shrink back into the avatar's chest when typing has stopped.
Note: The On-Typing trigger will not work if the avatar has the typing animations disabled.
==========[ Rezzer Overview ]==========
Now all of the above was an overview of the functionality of P.P.
Now we will talk about what you can do with your animations once you have them recorded.
One thing that is seen commonly with scene animation, is the ability to pack it up one the scene has been played. This will reduce prim count on your region since the only time the prims are on the island is when the scene is actually being played.
The way it can be done is using a rezzer script. Since all the prims are already linked together for the purpose of P.P. Animation, this is actually fairly easy.
Create a object that will serve as the "rezzer". This can be a terminal, sign or any prim you wish. The code below should be placed into a script and then placed into said object along with the actual scene.
So once you have copy and pasted the code into a script, right-click and edit your rezzer object. Go into the contents tab and place the script and the scene object into the contents.
With this script, on touching the object, a menu will appear. The menu will give the option to load the scene, clear the scene, play the scene or stop the scene.
REZZER UI SCRIPT:
list choices = ["Load Scene", "Play Scene", "Stop Scene", "Clear Scene"];
string stored;
//The listening channel of the dialog box
//This should be altered for every script that is a close
//vicinity of another using the same channel
integer channel_dialog = -3000;
default {
state_entry()
{
//This will sense if anyone is in the area, if not it sends a signal to "kill" script
//see kill script below
llSensorRepeat("", "", AGENT, 20.0, PI, 15.0);
}
touch_start(integer total_number)
{
//Intial Welcome Message
llDialog(llDetectedKey(0),"\nPlease choose an option:\n",choices, channel_dialog);
llListen( channel_dialog, "", stored, "" );
}
listen(integer channel, string name, key id, string choice)
{
if (choice == "Load Scene")
{
//Rezobject function
vector eul = <0,0,180>; //45 degrees around the z-axis, in Euler form
eul *= DEG_TO_RAD; //convert to radians
rotation quat = llEuler2Rot(eul); //convert to quaterniondefault
// This line will pick the first object out of the container and rez it
//The vector currently shown as <5,8,1> as well as the rotation vector above
//can be manipulated to determine placement for the rez.
llRezObject(llGetInventoryName(INVENTORY_OBJECT,0), llGetPos()+<5,8,1>,ZERO_VECTOR,quat,0);
}
if (choice == "Play Scene")
{
//The start trigger channel, in this case -900, must be defined in P.P.
//before publishing
llSay(-900, "start");
llSleep(21);
//This "float" and "float2" sends a message to 2 different script in the scene
// after a period of time [llSleep()] on channel -800. This can be used
//to create dialogue in the form of chat or floating text. The sleep delay
//is used to get the timing just right, see "float" script for example.
llSay(-800,"float");
llSleep(22);
llSay(-800,"float2");
}
if (choice == "Stop Scene")
{
//channel and trigger, like "start" must be defined in P.P. before publishing
llSay(-900, "stop");
}
if (choice == "Clear Scene")
{
//Like the sensor this is a manual way of sending the "kill" message to the
//scene, see the "kill script" below
llSay(-900, "kill");
}
}
sensor(integer num_detected)
{
}
no_sensor()
{
llSay(-900,"kill");
}
}
Scene Animation: By Ryon
==========[ Introduction ]==========
Prim Puppeteer is a set of scripts that will help animate your creation. The system is very similar to stop-motion animation. It works by taking snapshots of your prim's positions and allowing you to play back the recorded snapshots.
No coding is required to to use Puppeteer. However, if you are a scripter, you can further control the animation through linked message calls. Please read the section titled “Scripter's Guide”.
==========[ Table of Contents ]==========
- Introduction & Need to Know
- Basic Setup
- Chat Commands
- Triggers & Playback Customization
-Scene Rezzer Overview
-Rezzer UI Script
-Kill Script
-Float script
To Begin there is a program you will need called Prim Puppeteer (v8.0) This will overview the basics of P.P. and show how it can be used to create "animated scenes".
-= Need to Know =-
To use Puppeteer, you should have some basic understanding of the difference between linked prims and root prim. Here are some quick facts you need to know:
- There is only one root prim per link set.
- Root prim have a yellow border around it during editing.
- Link prims have a blue border around it during editing.
- Root prim will always be the last prim you select before using the Tools->Link command.
- Puppeteer only moves link prims and all movement are relative to the root prim.
Tip: Use an invisible root prim if you wish to create the illusion of the entire object moving.
Tip: Be sure to click the “Edit linked parts” check box in order to move the linked prims.
-= The Basic Setup =-
The easiest way to setup Puppeteer is by following the steps in Quick Start Instructions: This quick start guide and much more detailed info can be found on the notecard provided with the Prim Puppeteer.
1)Add all three Puppeteer scripts into the object you wish to animate.
2)Right click the object and select 'Take' then re-rez the object back out from your inventory.
3)Right click the object and select 'Edit...' then select 'Tools -> Set Scripts to Running in Selection' from the top menu bar.
After setup is complete. The “Puppeteer Link” script will delete itself from the root prim.
4) Type: /32 menu to bring up the P.P. menu.
To record snapshots with Puppeteer, type “/32 menu” to bring up the Edit Menu. After moving the prims around, simply click the “record” button to take a snapshot.
A snapshot in Puppeteer is simply a recording of all link prim's position, rotation, and size/scale. This have nothing to do with actually taking screenshots.
-= Chat Commands =-
Puppeteer supports a lot more commands than what is shown on the Edit Menu. To see all the possible commands, click the “help” button on the menu or type “/32 help”
Full chat command list:
/32 menu
This command brings up the Editing Menu. A must know!
/32 show <snapshot number>
This command will display a specific snapshot.
Example: “/32 show 2” This will show snapshot #2
Tip: You can drag the Puppeteer Editor script back into the object to unpublish and re-edit at any time. Please also note that you will note be able to edit other people's recordings.
/32 play
This command is similar to pressing the “play button” on the Editing Menu. The difference is that through chat command, you can loop the animation as well as set the play speed.
Example: “/32 play loop” will play the animation non-stop.
Example: “/32 play 0.5” will play the animation with only a 0.5 second delay between snapshots.
Example: “/32 play loop 2.0” will play animation non-stop with a 2 second delay between snapshots.
Note: 0.1 second delay between snapshots is the fastest allowed play speed.
/32 rplay
This command is very similar to the “/32 play” command except that it plays the animation in reverse order. You can also make this command loop or change the play speed.
/32 trigger
This command is the same as pressing the “trigger” button on the Editing Menu. It will allow you to customize the playback behavior. The triggers are only active after publish. See “Triggers & Playback Customization” section for more detail.
/32 delete <snapshot number>
This command will delete the snapshot specified.
Example: “/32 delete 3” will delete snapshot number 3\
/32 replace <snapshot number>
This command will record the current prim positions over the given snapshot. It is similar to the “/32 record” command except that the snapshot is not added to the end. Instead the snapshot will replace number specified.
Example: “/32 replace 2” will take a new snapshot and replace snapshot 2.
/32 insert <snapshot number>
This command will record a new snapshot and add it right before the specified snapshot.
Example: “/32 insert 4” will record a new snapshot and add it before the existing snapshot #4. So the old snapshot #4 is now snapshot #5 and the rest of the snapshots are all shifted down.
/32 reset
This command will delete ALL recorded snapshots.
/32 status
This command shows how many snapshots have been recorded. Number of recorded snapshots is also visible on the Edit Menu.
/32 export
This command will export print out all the recorded snapshots to the chat window for copy & paste into notecards. Due to Second Life's notecard size limitation, the export may span multiple notecards.
It is important to make sure the chat window is wide enough so the lines do not warp around.
Note: Playback settings are not part of the export. Only the recorded snapshots are exported.
/32 import <notecard name>
This is a Vendor Edition only command. This command is used to import the snapshots with the “/32 export” command. See “Importing from Notecard” section above for more details.
/32 purge
This command will delete ALL puppeteer scripts from the object. This can be used in conjunction with import/export command to upgrade to future versions of Puppeteer.
/32 removeunusedscripts
This command will look at the currently recorded animation and delete all the Puppeteer Link scripts that would not affect the animation. Basically any prim that has not moved, rotated, or resized will have thier script deleted from them. This is great for general optimzation. However, should you need to animate those prims again, you will need to add the Puppeteer Link scripts manually. It may also disrupt the anchoring feature of Puppeteer.
/32 channel <new channel number>
This command allows you to change the channel that the chat commands use. Please keep in mind that all chat commands are already restricted to owner only. Therefore there's no chance for conflict with other nearby Puppeteer users. This command only exist for personal preference.
Example: “/32 channel 3” from now on all commands listen on channel 3. So to bring up the menu would be “/3 menu”.
-= List of Animation Triggers =-
[ On-Touch ]
This trigger will activate when the object is clicked. Click the object again to stop the animation. This is the default trigger.
[ On-Chat ]
This trigger will activate the animation when a specific chat phrase is heard. After selecting On-Chat, another menu will show up allowing you to customize the start and stop phrase as well as the listening channel.
If the start and stop phrase is set to the same phrase, that chat phrase will use as a on/off toggle.
[ On-Rez ]
This trigger will start the animation as soon as an object is dragged from the inventory into the world.
[ On-Collision ]
This trigger will start the animation when the object is bumpped into or stepped on. You can use this trigger to activate an animation when someone is near it by having one of the prims covering the floor so people can step on it.
Note: SL's collision detection is not always reliable, especially when laggy. It is best to use On-collision triggers with play-once style rather than loop or ping-pong.
[ On-Sit ]
This trigger will start the animation when someone sits on the object. Make sure you adjust the set position using another script to get the desire effect.
[ On-Chance ]
This trigger will fire base on the percentage and the interval you specify. It is great for ambient animations. It will not activate if other trigger animations are currently playing. There are two exceptions to this, On-rez loops, and On-chance loops.
[ On-Fly ]
This trigger will only activate when the animated object is attached to an avatar. The trigger activates when the avatar is flying. This is useful for making wings or jet packs.
[ On-Walk ]
This trigger will only activate when the animated object is attached to an avatar. The trigger activates when the avatar is walking. This is an easy way to create fake attachment based vehicles that animate when you walk.
[ On-Typing ]
This trigger will only activate when the animated object is attached to an avatar. The trigger activates when the avatar is typing in chat. It is possible to make objects that pop up when you are typing and shrink back into the avatar's chest when typing has stopped.
Note: The On-Typing trigger will not work if the avatar has the typing animations disabled.
==========[ Rezzer Overview ]==========
Now all of the above was an overview of the functionality of P.P.
Now we will talk about what you can do with your animations once you have them recorded.
One thing that is seen commonly with scene animation, is the ability to pack it up one the scene has been played. This will reduce prim count on your region since the only time the prims are on the island is when the scene is actually being played.
The way it can be done is using a rezzer script. Since all the prims are already linked together for the purpose of P.P. Animation, this is actually fairly easy.
Create a object that will serve as the "rezzer". This can be a terminal, sign or any prim you wish. The code below should be placed into a script and then placed into said object along with the actual scene.
So once you have copy and pasted the code into a script, right-click and edit your rezzer object. Go into the contents tab and place the script and the scene object into the contents.
With this script, on touching the object, a menu will appear. The menu will give the option to load the scene, clear the scene, play the scene or stop the scene.
REZZER UI SCRIPT:
list choices = ["Load Scene", "Play Scene", "Stop Scene", "Clear Scene"]; string stored; //The listening channel of the dialog box //This should be altered for every script that is a close //vicinity of another using the same channel integer channel_dialog = -3000; default { state_entry() { //This will sense if anyone is in the area, if not it sends a signal to "kill" script //see kill script below llSensorRepeat("", "", AGENT, 20.0, PI, 15.0); } touch_start(integer total_number) { //Intial Welcome Message llDialog(llDetectedKey(0),"\nPlease choose an option:\n",choices, channel_dialog); llListen( channel_dialog, "", stored, "" ); } listen(integer channel, string name, key id, string choice) { if (choice == "Load Scene") { //Rezobject function vector eul = <0,0,180>; //45 degrees around the z-axis, in Euler form eul *= DEG_TO_RAD; //convert to radians rotation quat = llEuler2Rot(eul); //convert to quaterniondefault // This line will pick the first object out of the container and rez it //The vector currently shown as <5,8,1> as well as the rotation vector above //can be manipulated to determine placement for the rez. llRezObject(llGetInventoryName(INVENTORY_OBJECT,0), llGetPos()+<5,8,1>,ZERO_VECTOR,quat,0); } if (choice == "Play Scene") { //The start trigger channel, in this case -900, must be defined in P.P. //before publishing llSay(-900, "start"); llSleep(21); //This "float" and "float2" sends a message to 2 different script in the scene // after a period of time [llSleep()] on channel -800. This can be used //to create dialogue in the form of chat or floating text. The sleep delay //is used to get the timing just right, see "float" script for example. llSay(-800,"float"); llSleep(22); llSay(-800,"float2"); } if (choice == "Stop Scene") { //channel and trigger, like "start" must be defined in P.P. before publishing llSay(-900, "stop"); } if (choice == "Clear Scene") { //Like the sensor this is a manual way of sending the "kill" message to the //scene, see the "kill script" below llSay(-900, "kill"); } } sensor(integer num_detected) { } no_sensor() { llSay(-900,"kill"); } }KILL SCRIPT: ( placed into scene after publish)default { state_entry() { llListen( -900, "", NULL_KEY, "" ); } listen(integer channel, string name, key id, string message) { if (message == "kill") { llDie(); } } }FLOAT SCRIPT: (Placed into specific prim/NPC after publish)
default { state_entry() { llListen(-800, "", NULL_KEY, "" ); } listen(integer channel, string name, key id, string message) { if (message == "float2") { llSetText("Don't Worry we'll get you fixed up\n \n \n ", <1.0, 1.0, 1.0>, 1.0); llSay(0,"Don't Worry we'll get you fixed up"); llSleep(3); llSetText("",<1,1,1>,1.0); } } }